﻿Imports DevExpress.Utils
Imports DevExpress.XtraEditors
Imports DevExpress.XtraEditors.Controls
Public Class XtraForm1

    Private Sub DmkhachhangBindingNavigatorSaveItem_Click(sender As System.Object, e As System.EventArgs) Handles DmkhachhangBindingNavigatorSaveItem.Click
        setReadonly(Me.LayoutControl1, False)
        'Me.LayoutControl1.OptionsView.IsReadOnly = DefaultBoolean.False
        'Me.MataikhoanISearchLookupEdit.Properties.ReadOnly = False
        Me.MataikhoanISearchLookupEdit.Focus()
        'SendKeys.Send("%{DOWN}")
        'Me.MataikhoanISearchLookupEdit.Reset()
        'If Me.MataikhoanISearchLookupEdit.Focused Then
        '    Me.MataikhoanISearchLookupEdit.ShowPopup()
        '    Me.MataikhoanISearchLookupEdit.ClosePopup()
        '    Me.MataikhoanISearchLookupEdit.ShowPopup()
        'End If
        'Me.MataikhoanISearchLookupEdit.pro()
        Me.MataikhoanISearchLookupEdit.ShowPopup()
        'setReadonly(LayoutControl1, False)
        'Me.MataikhoanISearchLookupEdit.BeginInvoke(New MethodInvoker(AddressOf ShowPopup))

    End Sub

    Private Sub XtraForm1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        Me.DmkhachhangTableAdapter.Fill(Me.ErpharmaDataSet.dmkhachhang)
        Me.IGridView1.setChoPhepThemDong(True)
        Dim ht As Hashtable = New Hashtable
        ht.Add("ma", "not 0 and not null")
        'ht.Add("ma", "not 0")
        ht.Add("ten", "not 0")
        Me.IGridView1.setBatLoi(ht)
        'Me.MaduongISearchLookupEdit.Properties.ReadOnly = True
        'Me.MataikhoanISearchLookupEdit.Properties.ReadOnly = True
        Me.MataikhoanISearchLookupEdit.setNotShowPopUpEnter()
        'setReadonly(LayoutControl1, True)
        'Me.MataikhoanISearchLookupEdit.Properties.ReadOnly = True
        'Me.LayoutControl1.Item()
        setReadonly(Me.LayoutControl1, True)
        'Me.LayoutControl1.OptionsView.IsReadOnly = DefaultBoolean.True
    End Sub

    Private Sub ToolStripButton1_Click(sender As System.Object, e As System.EventArgs) Handles ToolStripButton1.Click
        Me.IDateEdit1.Properties.ReadOnly = True
    End Sub

    Private Sub ToolStripButton2_Click(sender As System.Object, e As System.EventArgs) Handles ToolStripButton2.Click
        Me.IDateEdit1.Properties.ReadOnly = False
    End Sub



End Class